      <h1>
        Registration Keys
      </h1>
      <p>
        Here you can create new keys for people to register with.
      </p>
      <div id="box1" class="tabDiv">
        <ul> 
          <li><a href="#box1_create" class="selected">Create a new key</a></li> 
          <li><a href="#box1_active">Active keys</a></li> 
        </ul> 
        <div id="box1_create" style="display: block; ">
          <form method="post" action="<?=URL?>/admin/keys.html">
            <p style="text-align: center;">
              <input type="submit" value="Create a new key" name="submit" />
            </p>
<? if(@$new): ?>
            <p style="text-align: center;">
              The following new key was generated:<br /><?=$new?>
            </p>
<? endif; ?>
          </form>
        </div> 
        <div id="box1_active" style="display: none; ">
<? if($keys->num_rows > 0): ?>
          <table style="width: 600px; margin: 0 auto;">
            <thead>
              <tr>
                <th>Key</th>
                <th>Created by</th>
              </tr>
            </thead>
            <tbody>
<? while($row = mysqli_fetch_object($keys)): ?>
<? $u = new User($row->creator); ?>
              <tr>
                <td style="font-family: monospace; text-align: center;"><?=$row->key?></td>
                <td style="text-align: center;"><?=lanchor('/members.html/' . $u->id, $u->account)?></td>
              </tr>
<? endwhile; ?>
            </tbody>
          </table>
<? else: ?>
          <p>
            There are currently no active keys.
          </p>
<? endif; ?>
        </div> 
      </div> 
      <script>
        $("#box1 ul").idTabs(); 
      </script>
